{extend name="./application/admin/view/public/base.html" /} {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>素材列表</strong></li>
	</ol>
</div>
<div class="ibox float-e-margins">
	<div class="ibox-title">
		<h5>素材列表</h5>
	</div>
	<div class="ibox-content">
		<div class="row">
			<div class="col-sm-12">
				<div class="col-sm-6">
					<div class="input-group">
						<a href="{:url('add')}" class="btn btn-primary btn-outline">添加素材</a>&nbsp;&nbsp;&nbsp;
						<a href="{:url('lists')}" class="btn btn-success btn-outline ajax-do">同步素材</a>(耗时较久，请慎用！！)
					</div>
				</div>
			</div>
		</div>
		<div class="hr-line-dashed"></div>
		<div class="example-wrap">
			<div class="example">
				<form method="post" action="{:url('index')}">
					<table class="table table-bordered table-hover">
						<thead>
							<tr class="long-th">
								<th width="50">
									<input type="checkbox" class="check-all">
								</th>
								<th>ID</th>
								<th>素材名</th>
								<th>素材类型</th>
								<th>缩略图</th>
								<th>素材ID</th>
								<th>添加时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							{foreach name="list" item="vo"}
							<tr>
								<td class="text-center">
									<input type="checkbox" name="ids[]" value="{$vo.id}">
								</td>
								<td class="text-center">{$vo.id}</td>
								<td class="text-center">{$vo.name}</td>
								<td class="text-center">{$vo.type}</td>
								<td class="text-center">
									<img src="{$vo.thumb}" class="wechat_thumb" />
								</td>
								<td>{$vo.media_id}</td>
								<td class="text-center">{$vo.add_time}</td>
								<td>
									{if $vo.type=='news'}
									<a href="{:url('update_news',['id'=>$vo.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp; {/if}
									<a href="{:url('delete',['id'=>$vo.id])}" class="btn btn-danger bnt-sm ajax-delete">
										<i class="fa fa-paste"></i> 删除</a>
								</td>
							</tr>
							{/foreach}
						</tbody>
					</table>
				</form>
				{$list->render()}
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script>
</script>
{/block}